<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/privacy/dlp/v2beta1/dlp.proto

namespace Google\Cloud\Dlp\V2beta1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Generated from protobuf message <code>google.privacy.dlp.v2beta1.RedactContentRequest.ReplaceConfig</code>
 */
class RedactContentRequest_ReplaceConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Type of information to replace. Only one ReplaceConfig per info_type
     * should be provided. If ReplaceConfig does not have an info_type, the DLP
     * API matches it against all info_types that are found but not specified in
     * another ReplaceConfig.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.InfoType info_type = 1;</code>
     */
    private $info_type = null;
    /**
     * Content replacing sensitive information of given type. Max 256 chars.
     *
     * Generated from protobuf field <code>string replace_with = 2;</code>
     */
    private $replace_with = '';

    public function __construct() {
        \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce();
        parent::__construct();
    }

    /**
     * Type of information to replace. Only one ReplaceConfig per info_type
     * should be provided. If ReplaceConfig does not have an info_type, the DLP
     * API matches it against all info_types that are found but not specified in
     * another ReplaceConfig.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.InfoType info_type = 1;</code>
     * @return \Google\Cloud\Dlp\V2beta1\InfoType
     */
    public function getInfoType()
    {
        return $this->info_type;
    }

    /**
     * Type of information to replace. Only one ReplaceConfig per info_type
     * should be provided. If ReplaceConfig does not have an info_type, the DLP
     * API matches it against all info_types that are found but not specified in
     * another ReplaceConfig.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.InfoType info_type = 1;</code>
     * @param \Google\Cloud\Dlp\V2beta1\InfoType $var
     * @return $this
     */
    public function setInfoType($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\InfoType::class);
        $this->info_type = $var;

        return $this;
    }

    /**
     * Content replacing sensitive information of given type. Max 256 chars.
     *
     * Generated from protobuf field <code>string replace_with = 2;</code>
     * @return string
     */
    public function getReplaceWith()
    {
        return $this->replace_with;
    }

    /**
     * Content replacing sensitive information of given type. Max 256 chars.
     *
     * Generated from protobuf field <code>string replace_with = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setReplaceWith($var)
    {
        GPBUtil::checkString($var, True);
        $this->replace_with = $var;

        return $this;
    }

}

